<?php

namespace Xrfg\Core\Trading\SystemAccount;

use Xrfg\Core\Trading\SystemAccount\Models\SystemAccount;
use Xrfg\Core\Trading\SystemAccount\Observers\AccountObserver;

class ServiceProvider extends \Illuminate\Support\ServiceProvider
{
    public function boot()
    {
        $this->registerObservers();

        if ($this->app->runningInConsole()) {
            $this->loadMigrationsFrom(__DIR__.'/../migrations');
        }
    }

    public function register()
    {
    }

    private function registerObservers()
    {
        SystemAccount::observe(AccountObserver::class);
    }
}
